﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SiteMapUI.aspx.cs" Inherits="ThangNM.Admin.SiteMapUI" MasterPageFile="~/PublicInterface/Admin.Master" %>
<%@ Register src="~/UserControl/MsgUC.ascx" tagname="MsgUC" tagprefix="uc1" %>
<%@ Register src="~/UserControl/ToolBarUC.ascx" tagname="ToolBarUC" tagprefix="uc2" %>
<%@ Register src="~/UserControl/Title_FormUC.ascx" tagname="Title_FormUC" tagprefix="uc3" %>

<asp:Content ID="cBody" runat="server" ContentPlaceHolderID="cphBody">
    <uc3:Title_FormUC ID="Title_FormUC1" runat="server" />
    <uc1:MsgUC ID="MsgUC1" runat="server" /><br />
    <uc2:ToolBarUC ID="ToolBarUC1" runat="server" OnEventButtonToolBar="EventButtonToolBar_Click"/>
    <asp:GridView ID="grvList" runat="server" AutoGenerateColumns="False" 
        class="table table-striped table-bordered table-hover dataTable no-footer styleGrid"
        ShowFooter = "True" DataKeyNames="loc,changefreq,priority"
        EnableModelValidation="True" emptydatatext="Không có bản ghi nào."
        onrowcommand="grvList_RowCommand" CellPadding="1" 
        onrowdatabound="grvList_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="loc">
                <HeaderTemplate>
                    <center>
                        loc<br /><asp:TextBox ID="txtloc_Temp" runat="server" CssClass="form-control" autocomplete="off"></asp:TextBox>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtloc" runat="server" Text='<%#Eval("loc")%>' CssClass="form-control" autocomplete="off"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Width="350px" />
                <ItemStyle Width="350px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="lastmod">
                <HeaderTemplate>
                    <center>
                        lastmod<br /><asp:TextBox ID="txtlastmod_Temp" runat="server" CssClass="form-control" Html5="date" autocomplete="off"></asp:TextBox>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtlastmod" runat="server" Text='<%#Eval("lastmod","{0:yyyy-MM-dd}")%>' CssClass="form-control" Html5="date" autocomplete="off"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Width="50px" />
                <ItemStyle Width="50px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="changefreq">
                <HeaderTemplate>
                    <center>
                        changefreq<br /><asp:DropDownList ID="ddlchangefreq_Temp" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblchangefreq" runat="server" Text='<%# Eval("changefreq") %>' Visible = "false" />
                    <asp:DropDownList ID="ddlchangefreq" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                </ItemTemplate>
                <HeaderStyle Width="120px" />
                <ItemStyle Width="120px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="priority">
                <HeaderTemplate>
                    <center>
                        priority<br /><asp:TextBox ID="txtpriority_Temp" runat="server" CssClass="form-control" type="number" autocomplete="off"></asp:TextBox>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtpriority" runat="server" Text='<%#Eval("priority")%>' CssClass="form-control" autocomplete="off"></asp:TextBox>
                </ItemTemplate>
                <HeaderStyle Width="60px" />
                <ItemStyle Width="60px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="type">
                <HeaderTemplate>
                    <center>
                        type<br /><asp:DropDownList ID="ddltype_Temp" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lbltype" runat="server" Text='<%# Eval("type") %>' Visible = "false" />
                    <asp:DropDownList ID="ddltype" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                </ItemTemplate>
                <HeaderStyle Width="180px" />
                <ItemStyle Width="180px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="status">
                <HeaderTemplate>
                    <center>
                        status<br /><asp:DropDownList ID="ddlstatus_Temp" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                    </center>
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblstatus" runat="server" Text='<%# Eval("status") %>' Visible = "false" />
                    <asp:DropDownList ID="ddlstatus" runat="server" CssClass="form-control" autocomplete="off"></asp:DropDownList>
                </ItemTemplate>
                <HeaderStyle Width="130px" />
                <ItemStyle Width="130px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="sType">
                <HeaderTemplate>
                    <br /><asp:Button ID="btnInsert" runat="server" Text="Thêm" OnClick = "btnInsert_Click" CssClass="btn btn-primary btn-sm"/><br />&nbsp;
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:Button ID="btnDelete" runat="server" Text="Xóa" CommandName="cmdDelete" CommandArgument='<%#Container.DataItemIndex %>' CssClass="btn btn-warning btn-sm" />
                </ItemTemplate>
                <HeaderStyle Width="30px" />
                <ItemStyle Width="30px" HorizontalAlign="Center" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle BackColor="#66CCFF"/>
    </asp:GridView>
    <br /><br /><br /><br /><br />
</asp:Content>
